/**
 * 详情对话框
 */
var StoreInfoDlg = {
    data: {
        storeName: "",
        addressId: "",
        addressDetail: "",
        cash: "",
        acountNum: "",
        picPath: "",
        accessoryPath: ""
    }
};

layui.use(['form', 'admin', 'ax','layedit','table','upload'], function () {
    var $ = layui.jquery;
    var $ax = layui.ax;
    var form = layui.form;
    var admin = layui.admin;
    var layedit = layui.layedit;
    var table = layui.table;
    var upload = layui.upload;

    //让当前iframe弹层高度适应
    admin.iframeAuto();

    //获取详情信息，填充表单
    var ajax = new $ax(Feng.ctxPath + "/store/detail?id=" + Feng.getUrlParam("id"));
    var result = ajax.start();
    form.val('storeForm', result.data);


    //返回按钮
    $("#backupPage").click(function () {
        window.location.href = Feng.ctxPath + '/store'
    });



    var Product = {
        tableId: "productTable"
    };

    //表格
    Product.initColumn = function () {
        return [[
            {field: 'id', hide: true, title: '主键'},
            {field: 'storeName', sort: true, title: '门店名称'},
            {field: 'addressDetail', sort: true, title: '详细地址'},
            {field: 'cash', sort: true, title: '押金'},
            {
                align: 'center', templet: function (d) {
                    return '<img src="'+d.picPath+'" class="tdImg" />';
                }, title: '图片', width: 90, unresize: true
            },
            {
                align: 'center', templet: function (d) {
                    return '<img src="'+d.accessoryPath+'" class="tdImg" />';
                }, title: '附件', width: 90, unresize: true
            },
            // {
            //     align: 'center', templet: function (d) {
            //         return '<img src="'+d.paperPath+'" class="tdImg" />';
            //     }, title: '设计图纸', width: 90, unresize: true
            // },
            {field: 'stringupstatus', sort: true, title: '审核状态'},
            {align: 'center', toolbar: '#tableBar', title: '操作'}
        ]];
    };

    // 渲染表格
    var tableResult = table.render({
        elem: '#' + Product.tableId,
        url: Feng.ctxPath + '/store/QueryRegionalManagerdetail',
        page: true,
        height: "full-158",
        cellMinWidth: 100,
        cols: Product.initColumn()
    });




    var Product2 = {
        tableId: "productTable2"
    };

    //表格
    Product2.initColumn = function () {
        return [[
            {field: 'processInstanceId', hide: true, title: '流程id'},
            {field: 'userName', sort: true, title: '审核人'},
            {field: 'deptName', sort: true, title: '审核人部门'},
            {field: 'comment', sort: true, title: '审批意见'},
            {field: 'checkStr', sort: true, title: '审核状态'},
            {field: 'auditTime', sort: true, title: '审核时间'},
            {align: 'center', toolbar: '#tableBar', title: '操作'}
        ]];
    };

    // 渲染表格
    var tableResult2 = table.render({
        elem: '#' + Product2.tableId,
        url: Feng.ctxPath + '/store/detail/'+$("#ids").val(),
        page: true,
        height: "full-158",
        cellMinWidth: 100,
        cols: Product2.initColumn()
    });





























});